//
//  flViewController.m
//  青春音乐OFJH
//
//  Created by mac on 16-11-16.
//  Copyright (c) 2016年 jh.chen. All rights reserved.
//

#import "flViewController.h"
#import "ldxViewController.h"
#import "fenleiViewController.h"
@interface flViewController ()

@end

@implementation flViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"分类";
    UIImageView * view  = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"photo.jpg"]];
    view.frame = CGRectMake(0, 0, 320, 580);
    [self.view addSubview:view];
    
    NSArray * arr = [NSArray arrayWithObjects:@"摇滚",@"开心",@"甜蜜", nil];
    
    UISegmentedControl *segmentedControl1 = [[UISegmentedControl alloc]
                                             initWithItems:arr];
    segmentedControl1.frame = CGRectMake(10, 70, 300, 40);
    [segmentedControl1 addTarget:self action:@selector(segChange)
                forControlEvents:UIControlEventValueChanged];
    [self.view addSubview:segmentedControl1];
    
       NSArray * arr1 = [NSArray arrayWithObjects:@"温暖",@"伤感",@"轻音乐", nil];
    
    UISegmentedControl *segmentedControl = [[UISegmentedControl alloc]
                                             initWithItems:arr1];
    segmentedControl.frame = CGRectMake(10, 150, 300, 40);
    [segmentedControl addTarget:self action:@selector(btnchange)
                forControlEvents:UIControlEventValueChanged];
    [self.view addSubview:segmentedControl];
    
   

}

-(void)segChange{
    
    ldxViewController * view = [[ldxViewController alloc]init];
    [self.navigationController pushViewController:view animated:YES];
    
    
}

-(void)btnchange{
    
   fenleiViewController * view = [[fenleiViewController alloc]init];
    [self.navigationController pushViewController:view animated:YES];
    
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
